package cn.edu.seu.HelloWorld;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        HelloWorld hw = (HelloWorld)ctx.getBean("helloWorld");
        hw.hello();
        
        Car car = (Car)ctx.getBean("car");
        System.out.println(car);
        
        Person person = (Person)ctx.getBean("person");
        System.out.println(person);
    }
}
